package com.aaa.entity;


import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 专区课程关联表
 * @TableName tb_zone_business
 */
@TableName(value ="tb_zone_business")
@Data
public class TbZoneBusiness implements Serializable {
    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 修改时间
     */
    private Date gmtModified;

    /**
     * 状态(1:正常;0:禁用)
     */
    private Integer isDisable;

    /**
     * 逻辑删除  0正常  1已删除
     */
    private Integer isDeleted;

    /**
     * 专区编号
     */
    private String zoneId;

    /**
     * 商家id
     */
    private String bid;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 上下架   0上架  1 未上架
     */
    private Integer putaway;

    @TableField(exist = false)
    private BBusinessInfo bBusinessInfo;

    public BBusinessInfo getbBusinessInfo() {
        return bBusinessInfo;
    }

    public void setbBusinessInfo(BBusinessInfo bBusinessInfo) {
        this.bBusinessInfo = bBusinessInfo;
    }

    public GSort getgSort() {
        return gSort;
    }

    public void setgSort(GSort gSort) {
        this.gSort = gSort;
    }

    public TbZone getTbZone() {
        return tbZone;
    }

    public void setTbZone(TbZone tbZone) {
        this.tbZone = tbZone;
    }

    public GGoods getgGoods() {
        return gGoods;
    }

    public void setgGoods(GGoods gGoods) {
        this.gGoods = gGoods;
    }

    @TableField(exist = false)
    private GSort gSort;

    @TableField(exist = false)
    private TbZone tbZone;

    @TableField(exist = false)
    private  GGoods gGoods;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbZoneBusiness other = (TbZoneBusiness) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDisable() == null ? other.getIsDisable() == null : this.getIsDisable().equals(other.getIsDisable()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getZoneId() == null ? other.getZoneId() == null : this.getZoneId().equals(other.getZoneId()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getPutaway() == null ? other.getPutaway() == null : this.getPutaway().equals(other.getPutaway()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDisable() == null) ? 0 : getIsDisable().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getZoneId() == null) ? 0 : getZoneId().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getPutaway() == null) ? 0 : getPutaway().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDisable=").append(isDisable);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", zoneId=").append(zoneId);
        sb.append(", bid=").append(bid);
        sb.append(", sort=").append(sort);
        sb.append(", putaway=").append(putaway);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}